<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>移出基地页面</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css" />
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="/static/css/default.css" rel="stylesheet" type="text/css" />
    <style>
        .box13 {
            margin-top:3em;
            width:13em;
            height:8em;
            margin-left:3em;
            font-variant-ligatures:common-ligatures discretionary-ligatures historical-ligatures;
            float:left;
        }
        .box14 {
            width:10em;
            height:8em;
            margin-left:3em;
            background:white;
            color:#ffc;
            text-shadow:0 0 .1em, 0 0 .3em;
            float:left;
        }
        .box13 a {
            background:azure;
            color:black;
            transition:0.5s;
        }
        .box14 a {
            background:black;
            color:#5bc0de;
            transition:1s;
        }
        /*:hover 状态下把文字本身隐藏掉，那它看起来真的就像在慢慢变模糊*/
        .box14 a:hover {
            color:transparent;
            text-shadow:0 0 .1em white, 0 0 .3em white;
        }
    </style>
<body>
<div style="top:20px; margin-left:20px">
    <input id="priNum" name="priNum" class="mini-hidden" style="width: 100%;" value="${paramMap.prinum!''}" />
    <#if paramMap.isPlyc=='false'>
        <div class="box13">
            <a class="mini-button mini-button-warning" plain="false" onclick="moveJd(1)">移出基地</a>
        </div>
        <div class="box13">
            <a class="mini-button mini-button-warning" plain="false" onclick="moveJd(12)">移至其他基地</a>
        </div>
    </#if>

    <#if paramMap.isPlyc=='true'>
        <div class="box13">
            <a class="mini-button mini-button-warning" plain="false" onclick="moveJd(2)">批量移出基地</a>
        </div>
        <div class="box13">
            <a class="mini-button mini-button-warning" plain="false" onclick="moveJd(13)">批量移至其他基地</a>
        </div>
    </#if>
</div>

<script type="text/javascript">
    mini.parse();

    function moveJd(type) {
        var priNum = mini.get("priNum").getValue();
        if (type == 1) {
            $.ajax({
                url: "/azbj/azbjgl/azgzgl/moveJdCheckPriNum",
                type: "post",
                data: {priNum: priNum},
                success: function (obj) {
                    if (obj.code == 1) {
                        mini.alert("操作成功", "成功", window.CloseOwnerWindow);
                    } else if (obj.code == 4000) {
                        mini.alert(obj.message);
                    } else if (obj.code == 5599) {
                        mini.alert(obj.message);
                    }
                }
            })
        } else if (type == 12) {
            mini.open({
                url: "/azbj/azbjgl/azgzgl/moveJdChange?priNum=" + priNum,
                title: "移至基地", width: '480px', height: '320px',
                allowResize: false,
                onload: function () {
                },
                ondestroy: function (action) {
                    grid.reload();
                }
            });
        } else if (type == 2) {
            var prinums = "${paramMap.prinum}";
            $.ajax({
                url: "/azbj/azbjgl/azgzgl/moveJdCheckPriNumPl",
                type: "post",
                data: {priNums: prinums},
                success: function (obj) {
                    if (obj.code == 1) {
                        mini.alert("操作成功", "成功", window.CloseOwnerWindow);
                    } else if (obj.code == 4000) {
                        mini.alert(obj.data);
                    } else if (obj.code == 5599) {
                        mini.alert(obj.message);
                    }
                }
            })
        } else if (type == 13) {
            var prinums = "${paramMap.prinum}";
            var arr = prinums.split("|");
            mini.open({
                url: "/azbj/azbjgl/azgzgl/moveJdChangePl?priNums=" + arr,
                title: "批量移至基地", width: '480px', height: '320px',
                allowResize: false,
                onload: function () {
                },
                ondestroy: function (action) {
                    grid.reload();
                }
            });
        }
    }
</script>
</body>
</html>